package com.shawn.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shawn.model.entity.UserInfo;
import feign.Param;
import org.apache.ibatis.annotations.Select;

public interface UserInfoMapper extends BaseMapper<UserInfo> {
    @Select("SELECT * FROM tb_user_info WHERE tb_user_info.id IN (\n" +
            "SELECT tb_black_list.black_user_id FROM tb_black_list WHERE tb_black_list.user_id = #{userId}\n" +
            ") ")
    IPage<UserInfo> selectByPage(@Param("page") Page<UserInfo> page, @Param("userId") Long userId);
}
